package com.yamaikj.service.impl;

//import com.codingapi.txlcn.tc.annotation.DTXPropagation;
//import com.codingapi.txlcn.tc.annotation.LcnTransaction;
//import com.codingapi.txlcn.tc.annotation.TccTransaction;
//import com.codingapi.txlcn.tc.annotation.TxTransaction;
//import com.codingapi.txlcn.tc.annotation.TxcTransaction;
//import com.codingapi.txlcn.tc.core.DTXLocalContext;
import com.yamaikj.dao.GoodsDao;
import com.yamaikj.model.Goods;
import com.yamaikj.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
//import org.springframework.transaction.annotation.Transactional;

import java.util.concurrent.ConcurrentHashMap;


/**
 * @description:
 * @author: swj
 * @time: 2020/3/17 14:32
 */
@Service
public class GoodsServiceImpl implements GoodsService {

    private ConcurrentHashMap<String, Long> ids = new ConcurrentHashMap<>();

    @Autowired
    private GoodsDao goodsDao;

//    @LcnTransaction //分布式事务注解
//    @Transactional //本地事务注解
    public Goods save(Goods goods) {
        return goodsDao.save(goods);
    }

}
